package com.zyf.swordRefersOffer;

import java.text.DecimalFormat;
import java.util.Scanner;

public class _06_ {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = "";

		int[][] qq = new int[10][2];
		for (int i = 0; i < qq.length && sc.hasNext(); i++) {
			for (int j = 0; j < 2 && sc.hasNext(); j++) {
				qq[i][j] = sc.nextInt();
			}
		}

		for (int i = 0; i < qq.length; i++) {
			DecimalFormat df = new DecimalFormat("##.##");
			System.out.println(df.format(sum(qq[i][0], qq[i][1])));
		}
	}

	public static double sum(int n, int m) {
		double sum = 0;
		double aa = n;
		for (int i = 1; i <= m; i++) {
			sum += aa;
			aa = Math.sqrt(aa);
		}
		return sum;
	}
}
